﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ISFProject.Models;


namespace ISFProject.Models
{
    public class Event
    {
        [Key]
        public int EventId { get; set; }

        [Required]
        [Display(Name = "Type of sport")]
        [EnumDataType(typeof(SportCategory))]
        public SportCategory Type { get; set; }

        [Required(ErrorMessage = "Please enter a school name")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid field length")]
        [Display(Name = "School name*")]
        public string Name { get; set; }

        [Required(ErrorMessage = "Please choose between T or D")]
        //nog aan te vullen
        public string TimeOrLength { get; set; }

        public int MinResult { get; set; }//string? => andere validation naarmate timeOrLength aanpast

        public int MaxResult { get; set; }

        //schoolcup:aanduiding dat het resultaat in aanmerking komt voor de schoolcup slide 17
        public virtual List<EventMeeting> EventMeetings { get; set; }
    }
}
